#include "NetWork/Buffer.h"
#include "Catch2.v3/catch_amalgamated.hpp"
#include <string>
#include <cstring>

TEST_CASE("NetWork::Buffer") {
    NetWork::Buffer buffer(16);

    std::string str = "hello world";

    buffer.Wirte(str.c_str(), str.size());

    auto buf = buffer.Read(10);

    buffer.Wirte("nihao world", std::strlen("nihao world"));
    buffer.Wirte("0.0 nihao world", std::strlen("0.0 nihao world"));
}